<template>
  <div class="home">
    <div class="indexNav">
      <div class="top">
        <div class="top1">
          <div class="imgs">
            <img src="../assets/images/logon.png" alt="" />
          </div>
          <div class="lefts">
            <div></div>
            <div class="lefts1">浙江省非物质文化<br />数字文献中心</div>
            <div class="lefts2">
              ZhejiangProvinceIntangibleCultureDigitalLiteratureCenter
            </div>
          </div>
          <div class="rights">
            <div class="ris1">
              <!-- <div class="ri">会员</div>
                <div class="ri">帮助</div>
                <div class="ri">我的</div> -->
              <div class="ri">&emsp;&emsp;</div>
              <div class="ri">&emsp;&emsp;</div>
              <!-- <div class="ri" style="cursor: pointer" @click="touser()">我的</div> -->
              <!-- <div class="ri">
                <el-dropdown @command="handleCommand" trigger="click">
                  <span class="el-dropdown-link" style="cursor: pointer">
                    <span
                      style="
                        font-size: 18px;
                        font-family: Source Han Sans CN-Regular,
                          Source Han Sans CN;
                        font-weight: 400;
                        color: #333333;
                      "
                      >欢迎
                    </span>
                    <span style="padding-left: 12px; font-size: 16px">
                      {{ yhm.yhm }}
                    </span>
                    <i
                      class="el-icon-arrow-down el-icon--right"
                      style="font-size: 14px"
                    ></i>
                  </span>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item @click="tologin()"
                      >退出登录</el-dropdown-item
                    >
                  </el-dropdown-menu>
                </el-dropdown>
              </div> -->

              <!-- <div class="ri1" @click="logins()" v-if="!yhm.yhm">登录</div> -->
            </div>
            <div class="ris2" v-if="showLogin">
              <div class="login">登录</div>
              <el-form ref="form" :model="formLogin">
                <el-form-item>
                  <div class="i1" :class="activet == 0 ? 'i1' : 'i2'">
                    <el-input
                      v-model="formLogin.name"
                      placeholder="请输入账号"
                      @blur="handleBlur"
                      @focus="handleFocus"
                    >
                      <i
                        slot="prefix"
                        class="el-input__icon el-icon-user"
                        style="font-size: 20px"
                        v-if="activet == 0"
                      ></i>
                      <i
                        slot="prefix"
                        class="el-input__icon el-icon-user"
                        style="font-size: 20px; color: #333333"
                        v-else
                      ></i>
                    </el-input>
                    <div class="zh">账号</div>
                  </div>
                </el-form-item>
                <el-form-item>
                  <div class="i1" :class="activet1 == 0 ? 'i1' : 'i2'">
                    <el-input
                      v-model="formLogin.padd"
                      placeholder="请输入密码"
                      @blur="handleBlur1"
                      @focus="handleFocus1"
                    >
                      <i
                        slot="prefix"
                        class="el-input__icon el-icon-lock"
                        style="font-size: 20px"
                        v-if="activet1 == 0"
                      ></i>
                      <i
                        slot="prefix"
                        class="el-input__icon el-icon-lock"
                        style="font-size: 20px; color: #333333"
                        v-else
                      ></i>
                    </el-input>
                    <div class="zh">密码</div>
                  </div>
                </el-form-item>
              </el-form>
              <div class="submit">登录</div>
              <div class="fts">
                <div class="fts1" @click="tologout()">立即注册</div>
                <div class="fts2">忘记密码</div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="hearde">
        <div class="navs">
          <div class="nav">
            <div
              class="nav1"
              @click="topath(item.id, item.path)"
              :class="active == item.id ? 'acnav1' : ''"
              v-for="(item, index) in navlist"
              :key="item.id"
            >
              {{ item.name }}
            </div>
          </div>
        </div>
      </div>
    </div>
    <!-- <router-view /> -->
    <div class="shouye">
      <div class="index1">
        <div class="sousuo">
          <el-form
            :inline="true"
            :model="formInline"
            class="demo-form-inline"
            style="width: 100%; display: flex; height: 56px"
          >
            <el-form-item style="width: 83%; margin-bottom: 0; cursor: pointer">
              <el-input
                v-model="formInline.user"
                placeholder="输入关键词搜索"
                style="width: 100%"
                @keyup.enter.native="onSubmit"
              >
                <img
                  @click="onSubmit"
                  slot="append"
                  src="../assets/images/sousuo.png"
                  alt=""
                />
              </el-input>
              <!-- <el-input placeholder="输入关键词搜索" v-model="formInline.user" class="input-with-select">
              <el-button slot="append" icon="el-icon-search" @click="sousuos()"></el-button>
            </el-input> -->
            </el-form-item>
            <div
              style="
                width: 15%;
                padding-left: 20px;
                margin-bottom: 5px;
                cursor: pointer;
              "
              @click="retrieval()"
            >
              <div
                style="
                  display: flex;
                  align-items: center;
                  height: 100%;
                  font-size: 18px;
                  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
                  font-weight: 400;
                  color: #911f23;
                "
              >
                高级检索
                <i
                  style="font-size: 18px; font-weight: 550"
                  class="el-icon-arrow-right"
                ></i>
              </div>
            </div>
          </el-form>
          <div class="ria">
          
            <el-checkbox-group
              v-model="leixinglist"
              @change="shunianfen"
              v-if="active != 4"
            >
              <el-checkbox
                v-for="tag in time1"
                :key="tag.id"
                :label="tag.id"
                :checked="true"
                >{{ tag.mc }}</el-checkbox
              >
            </el-checkbox-group>
          </div>
        </div>
        <div class="nr">
           <div class="nr1" @click="toshuji1(45)" @mouseenter="openedog(45)"  @mouseleave="openedog1(45)">
                <img v-if="indexnavs==false && indexid == 45" src="../assets/images/m11.png" alt="">
                <img v-else src="../assets/images/n11.png" alt="">
                <div class="biaoti">
                  <div class="b1">书籍</div>
                  <div class="b2">Books</div>
                </div>
            </div>
            <div class="nr1"  @click="toshuji1(46)" @mouseenter="openedog(46)"  @mouseleave="openedog1(46)">
                <img v-if="indexnavs==false && indexid == 46" src="../assets/images/m12.png" alt="">
                <img v-else src="../assets/images/n12.png" alt="">
                <div class="biaoti">
                  <div class="b1">期刊</div>
                  <div class="b2">Journal</div>
                </div>
            </div>
             <div class="nr1"  @click="toshuji1(47)" @mouseenter="openedog(47)"  @mouseleave="openedog1(47)">
                <img v-if="indexnavs==false && indexid == 47" src="../assets/images/m13.png" alt="">
                <img v-else src="../assets/images/n13.png" alt="">
                <div class="biaoti">
                  <div class="b1">简报</div>
                  <div class="b2">Briefing</div>
                </div>
            </div>
            <div class="nr1" @click="danPc(5)" @mouseenter="openedog(5)"  @mouseleave="openedog1(5)">
                <img v-if="indexnavs==false && indexid == 5" src="../assets/images/m1.png" alt="">
                <img v-else src="../assets/images/n1.png" alt="">
                <div class="biaoti">
                  <div class="b1">普查线索档案</div>
                  <div class="b2">Census clue files</div>
                </div>
            </div>
            <div class="nr1" @click="danPc(6)" @mouseenter="openedog(6)"  @mouseleave="openedog1(6)">
                <img v-if="indexnavs==false && indexid == 6" src="../assets/images/m2.png" alt="">
                <img v-else src="../assets/images/n2.png" alt="">
                <div class="biaoti">
                  <div class="b1">调查项目档案</div>
                  <div class="b2">Survey project archives</div>
                </div>
            </div>
            <div class="nr1" @click="danPc(7)" @mouseenter="openedog(7)"  @mouseleave="openedog1(7)">
                <img v-if="indexnavs==false && indexid == 7" src="../assets/images/m3.png" alt="">
                <img v-else src="../assets/images/n3.png" alt="">
                <div class="biaoti">
                  <div class="b1">非遗项目申报书</div>
                  <div class="b2">Project Application Form</div>
                </div>
            </div>
            <div class="nr1" @click="danPc(8)" @mouseenter="openedog(8)"  @mouseleave="openedog1(8)">
                <img v-if="indexnavs==false && indexid == 8" src="../assets/images/m4.png" alt="">
                <img v-else src="../assets/images/n4.png" alt="">
                <div class="biaoti">
                  <div class="b1">传承人申报书</div>
                  <div class="b2">Declaration of Inheritor</div>
                </div>
            </div>
            <div class="nr1" @click="danPc(9)" @mouseenter="openedog(9)"  @mouseleave="openedog1(9)">
                <img v-if="indexnavs==false && indexid == 9" src="../assets/images/m5.png" alt="">
                <img v-else src="../assets/images/n5.png" alt="">
                <div class="biaoti">
                  <div class="b1">基地申报书</div>
                  <div class="b2">Base Declaration Form</div>
                </div>
            </div>
            <div class="nr1" @click="tolilun(69)" @mouseenter="openedog(69)"  @mouseleave="openedog1(69)">
                <img v-if="indexnavs==false && indexid == 69" src="../assets/images/m6.png" alt="">
                <img v-else src="../assets/images/n6.png" alt="">
                <div class="biaoti">
                  <div class="b1">论文</div>
                  <div class="b2">Paper</div>
                </div>
            </div>
            <div class="nr1" @click="tolilun(70)" @mouseenter="openedog(70)"  @mouseleave="openedog1(70)">
                <img v-if="indexnavs==false && indexid == 70" src="../assets/images/m7.png" alt="">
                <img v-else src="../assets/images/n7.png" alt="">
                <div class="biaoti">
                  <div class="b1">课题</div>
                  <div class="b2">Topic</div>
                </div>
            </div>
             <div class="nr1" @click="toyxdanx(58)" @mouseenter="openedog(58)"  @mouseleave="openedog1(58)">
                <img v-if="indexnavs==false && indexid == 58" src="../assets/images/m8.png" alt="">
                <img v-else src="../assets/images/n8.png" alt="">
                <div class="biaoti">
                  <div class="b1">图片</div>
                  <div class="b2">Picture</div>
                </div>
            </div>
            <div class="nr1" @click="toyxdanx(60)" @mouseenter="openedog(60)"  @mouseleave="openedog1(60)">
                <img v-if="indexnavs==false && indexid == 60" src="../assets/images/m9.png" alt="">
                <img v-else src="../assets/images/n9.png" alt="">
                <div class="biaoti">
                  <div class="b1">视频</div>
                  <div class="b2">Video</div>
                </div>
            </div>
             <div class="nr1" @click="toyxdanx(59)" @mouseenter="openedog(59)"  @mouseleave="openedog1(59)">
                <img v-if="indexnavs==false && indexid == 59" src="../assets/images/m10.png" alt="">
                <img v-else src="../assets/images/n10.png" alt="">
                <div class="biaoti">
                  <div class="b1">音频</div>
                  <div class="b2">Audio frequency</div>
                </div>
            </div>
            
           
           
        </div>
      </div>
    </div>
    <!-- <div style="width: 100%; height: 0px"></div> -->
    <footbtn ></footbtn>
  </div>
</template>
<style scoped  lang="scss">
::v-deep .el-input__inner:focus {
  border-color: #fff !important;
  outline: 0;
  
}
::v-deep .el-checkbox-group {
  line-height: 21px;
}
::v-deep .el-input__inner:hover {
  border-color: #fff !important;
}
::v-deep .el-button--primary:focus,
.el-button--primary:hover {
  background: #911f23;
  border-color: #911f23;
  color: #fff;
}
::v-deep .el-input.is-active .el-input__inner,
.el-input__inner:focus {
  border-color: #fff !important;
  outline: 0;
}
::v-deep .el-dropdown-menu__item:focus,
.el-dropdown-menu__item:not(.is-disabled):hover {
  background-color: #f3ebeb;
  color: #911f23;
}
::v-deep .el-input {
  display: flex;
  justify-content: center;
  color: #333333;
}
::v-deep .el-input--prefix .el-input__inner {
  width: 305px !important;
  // height: 46px;
  // background: url("../assets/images/inputs.png") no-repeat;
  // background-size: 100% 100%;
  border: 0px;
}
::v-deep .el-form-item {
  margin-bottom: 32px;
}

.home {
  width: 100%;
}
.indexNav {
  max-width: 100%;
  min-width: 1400px;
  min-height: 532px;
  margin: 0 auto;
  background: url("../assets/images/bj.png") no-repeat;
  background-size: 100% 100%;
}
.foots {
  position: fixed;
  bottom: 0;
  left: 0;
}
.top {
  width: 1400px;
  height: 176px;
  margin: 0 auto;
  // background-color: #F7F7F8;
  .top1 {
    position: relative;
    width: calc(100% - 0px);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    // background-color: pink;
    .imgs {
      position: absolute;
      top: 0;
      width: 138px;
      height: 176px;
      z-index: 100;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .lefts {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
      margin-left: 170px;
      .lefts1 {
        font-size: 24px;
        font-family: Source Han Sans CN-Regular, Source Han Sans CN;
        font-weight: 400;
        color: #333333;
        line-height: 35px;
        letter-spacing: 3px;
      }
      .lefts2 {
        font-size: 14px;
        font-family: Source Han Sans CN-Regular, Source Han Sans CN;
        font-weight: 400;
        color: #666666;
        padding-bottom: 12px;
      }
    }
    .rights {
      width: 362px;
      position: relative;
      padding-bottom: 40px;
      .ris1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 18px;
        width: 100%;
        font-family: Source Han Sans CN-Regular, Source Han Sans CN;
        font-weight: 400;
        color: #3d3d3d;
      }
      .ris2 {
        position: absolute;
        top: 50px;
        width: calc(100% - 48px);
        height: 290px;
        background: #ffffff;
        box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.2);
        border-radius: 8px 8px 8px 8px;
        opacity: 1;
        z-index: 20;
        padding: 24px;
        .login {
          width: 100%;
          text-align: center;
          font-size: 24px;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #333333;
          padding-bottom: 24px;
        }
        .i1 {
          position: relative;
          width: 100%;
          height: 5px;
          background: url("../assets/images/inputs.png") no-repeat;
          background-size: 100% 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          .zh {
            position: absolute;
            top: -20px;
            left: 30px;
            font-size: 12px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #999999;
          }
        }
        .i2 {
          position: relative;
          width: 100%;
          height: 52px;
          background: url("../assets/images/inputs1.png") no-repeat;
          background-size: 100% 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          .zh {
            position: absolute;
            top: -20px;
            left: 30px;
            font-size: 12px;
            font-family: Source Han Sans CN-Regular, Source Han Sans CN;
            font-weight: 400;
            color: #333333;
          }
        }
        .submit {
          width: 100%;
          height: 46px;
          background: #911f23;
          border-radius: 8px 8px 8px 8px;
          opacity: 1;
          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 18px;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          color: #ffffff;
        }
        .fts {
          width: 100%;
          display: flex;
          justify-content: space-between;
          margin-top: 10px;
          font-size: 12px;
          font-family: Source Han Sans CN-Regular, Source Han Sans CN;
          font-weight: 400;
          .fts1 {
            color: #911f23;
            cursor: pointer;
          }
          .fts2 {
            color: #cccccc;
            cursor: pointer;
          }
        }
      }
      .ri {
        padding-right: 30px;
      }
      .ri1 {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 68px;
        height: 38px;
        background: #911f23;
        border-radius: 8px 8px 8px 8px;
        opacity: 1;
        color: #fff;
        cursor: pointer;
      }
    }
  }
}
.hearde {
  position: relative;
  min-width: 1200px;
  // height: 680px;
  // background: url("../assets/images/bj.png") no-repeat;
  // background-size: 100% 100%;
  .navs {
    min-width: 1200px;
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
  }
  .nav {
    width: 700px;
    margin-left: 166px;
    display: flex;
    justify-content: space-between;
    .nav1 {
      font-size: 18px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #3d3d3d;
      // background: #911F23;
      border-radius: 8px 8px 8px 8px;
      padding: 10px 14px;
      cursor: pointer;
    }
    .acnav1 {
      height: 26px;
      font-size: 18px;
      font-family: Source Han Sans CN-Regular, Source Han Sans CN;
      font-weight: 400;
      color: #fff;
      background: #911f23;
      border-radius: 8px 8px 8px 8px;
      padding: 10px 14px;
      cursor: pointer;
    }
  }
}
</style>
<style scoped  lang="scss">
::v-deep .el-tree-node__content:hover {
  background-color: transparent;
}
::v-deep .el-tree-node:focus > .el-tree-node__content {
  background-color: transparent;
}

::v-deep .el-tree-node__label {
  padding-right: 20px;
  font-size: 14px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #3d3d3d !important;
}
::v-deep .el-tree-node__content > .el-tree-node__expand-icon {
  padding-right: 4px;
  display: none;
}
::v-deep .el-tree {
  display: flex;
  background: none;
  width: 870px;
}
::v-deep .el-checkbox {
  font-size: 14px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #3d3d3d !important;
  margin-right: 42px !important;
  line-height: 30px !important;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  font-size: 14px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #3d3d3d !important;
}
::v-deep .el-checkbox__input.is-fcous .el-checkbox__inner {
  border-color: #911f23 !important;
}

::v-deep .el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
  background-color: #911f23;
  border-color: #911f23;
}
::v-deep .el-form-item {
  width: 100%;
}
::v-deep .el-form-item__content {
  width: 100%;
}
::v-deep .el-button--primary {
  background-color: #911f23;
  border-color: #911f23;
  border-radius: 8px;
  height: 50px;
}
::v-deep .el-input__inner {
  border: 1px solid #fff;
  height: 50px;
  padding-left: 20px;
}

::v-deep .el-input-group__append {
  border: none !important;
  background-color: #fff;
  padding: 0 45px 0 10px;
}
::v-deep .el-input-group__append img {
  width: 32px;
  height: 32px;
  padding-top: 10px;
  cursor: pointer;
}
::v-deep .el-input__icon {
  height: 100%;
  width: 10px;
  text-align: center;
  transition: all 0.3s;
  line-height: 50px;
  color: #911f23;
  // display: none;
}
::v-deep [class^="el-icon-"] {
  font-size: 20px;
}

::v-deep .el-radio {
  .el-radio__input {
    .el-radio__inner {
      border-radius: 2px;
      // height: 16px;
      // width: 16px;
    }
  }
  .el-radio__input.is-checked .el-radio__inner::after {
    content: "";
    width: 8px;
    height: 3px;
    border: 2px solid white;
    border-top: transparent;
    border-right: transparent;
    text-align: center;
    display: block;
    position: absolute;
    top: 2px;
    left: 1px;
    vertical-align: middle;
    transform: rotate(-45deg);
    border-radius: 0px;
    background: none;
  }
}
::v-deep .el-radio__label {
  font-size: 14px;
  font-family: Source Han Sans CN-Regular, Source Han Sans CN;
  font-weight: 400;
  color: #3d3d3d !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: #911f23 !important;
  background: #911f23 !important;
}
::v-deep .el-radio__inner {
  &:hover {
    border-color: #911f23;
  }
}
.shouye {
  width: 1400px;
  margin: 0 auto;
  margin-top: -142px;
  margin-bottom: 0px;
  .index1 {
    width: 100%;
    .sousuo {
      position: relative;
      width: 870px;
      margin: 0 auto;
      .ria {
        position: absolute;
        top: 50px;
        width: 750px;
        display: flex;
        margin-top: 14px;
        z-index: 1000;
        // float: left;
      }
    }
    .nr {
      width: calc(100% - 64px);
      // height: 500px;
      padding:48px 32px 32px;
      // background-color: pink;
      margin-top: 86px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      .nr1{
        width: 14.3%;
        
        height: 230px;
        background: #FFFFFF;
        box-shadow: 1px 3px 7px 0px rgba(0,0,0,0.2);
        border-radius: 18px;
        margin: 0 0px 40px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        img{
          width: 80px;
          height: 80px;
        }
        .biaoti{
          padding-top: 26px;
          width: 100%;
          text-align: center;
          .b1{
            font-size: 20px;
            // font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 550;
            color: #000000;
            line-height: 28px;
            letter-spacing: 1px;
            text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
          }
          .b2{
            font-size: 14px;
            // font-family: PingFangSC-Regular, PingFang SC;
            font-weight: 400;
            color: #999999;
            padding-top: 6px;
          }
        }
      }
      .nr1:hover{
        background-color: #911f23;
        .biaoti{
          padding-top: 26px;
          width: 100%;
          text-align: center;
          .b1{
            color: #FFFFFF;
            line-height: 28px;
            letter-spacing: 1px;
            text-shadow: 1px 1px 1px rgba(255,255,255,0.5);
          }
          .b2{
            color: #DADADA;
          }
        }
      }

    }
  }
}
</style>


<script>
import axios from "axios";
import footbtn from "../components/foot/index.vue";
import { getjiedian, getjiedian1, gettuichu,getdiqu,getpicidz } from "@/api/api.js";
export default {
  name: "HomeView",
  data() {
    return {
      leixinglist: [],
      time1: [],
      time2: [
        { id: 5, mc: "普查线索档案", fid: 2, num: 0, children: [] },
        { id: 6, mc: "调查项目档案", fid: 2, num: 0, children: [] },
        { id: 7, mc: "非遗项目申报书", fid: 3, num: 0, children: [] },
        { id: 8, mc: "传承人申报书", fid: 3, num: 0, children: [] },
        { id: 9, mc: "基地申报书", fid: 3, num: 0, children: [] },
        // { id: 28, mc: "会议档案", fid: 4, num: 0, children: [] },
        // { id: 29, mc: "活动档案", fid: 4, num: 0, children: [] },
        // { id: 30, mc: "文件档案", fid: 4, num: 0, children: [] },
      ],
      booklist: [
        // { id: 48, mc: "丛书类", fid: 45, num: 0, children: [] },
        // { id: 49, mc: "大观类", fid: 45, num: 0, children: [] },
        // { id: 50, mc: "非遗通识教育读本", fid: 45, num: 0, children: [] },
        // { id: 51, mc: "图集（典）", fid: 45, num: 0, children: [] },
        // { id: 52, mc: "论文集", fid: 45, num: 0, children: [] },
        // { id: 53, mc: "报告集", fid: 45, num: 0, children: [] },
        // { id: 54, mc: "专著", fid: 45, num: 0, children: [] },
        { id: 45, mc: "书籍", fid: 45, num: 0, children: [] },
        {id: 47, mc: "简报", fid: 44, num: 0, children: []},
        {id: 46, mc: "期刊", fid: 46, num: 0, children: []},
        // {id: 56, mc: "综合期刊", fid: 46, num: 0, children: []}
      ],
      yinxlist: [
        { id: 58, mc: "图片", fid: 57, num: 0, children: [] },
        { id: 59, mc: "音频", fid: 57, num: 0, children: [] },
        { id: 60, mc: "视频", fid: 60, num: 0, children: [] },
        // { id: 61, mc: "申报类", fid: 60, num: 0, children: [] },
        // { id: 62, mc: "宣传类", fid: 60, num: 0, children: [] },
        // { id: 63, mc: "影视类", fid: 60, num: 0, children: [] },
        // { id: 64, mc: "会议类", fid: 60, num: 0, children: [] },
        // { id: 65, mc: "培训类", fid: 60, num: 0, children: [] },
        // { id: 66, mc: "活动类", fid: 60, num: 0, children: [] },
        // { id: 67, mc: "记录工程类", fid: 60, num: 0, children: [] },
      ],
      lilunlist: [
        { id: 69, mc: "论文", fid: 68, num: 0, children: [] },
        { id: 70, mc: "课题", fid: 68, num: 0, children: [] },
      ],
      active: 4,
      navlist: [
        { id: 4, name: "  全部  ", path: "/index" },
        { id: 0, name: "数字档案", path: "/indexs" },
        { id: 1, name: "集成志书", path: "/history" },
        { id: 2, name: "音像资料", path: "/humanity" },
        { id: 3, name: "理论研究", path: "/books" },
        { id: 5, name: "", path: "" },
        { id: 6, name: "", path: "" },
        { id: 7, name: "", path: "" },
      ],

      formLogin: {
        name: "",
        padd: "",
      },
      showLogin: false,
      activet: 0,
      activet1: 0,

      type: [],
      formInline: {
        user: "",
        radio: "1",
      },

      data2: [],
      defaultProps: {
        children: "children",
        label: "mc",
      },
      shuzilist: [],
      lilunlist: [],
      yxlist: [],
      jclist: [],
      yhm: {},
      checkedKeys: [],
      arr: ["2018", "2019", "2020", "2021", "2022", "2023"],
      indexnavs:true,
    };
  },
  created() {
    this.yhm = JSON.parse(sessionStorage.getItem("loginInfo"))
      ? JSON.parse(sessionStorage.getItem("loginInfo"))
      : "";
      sessionStorage.removeItem("sousuo")
      sessionStorage.removeItem("pcdangxiang")
      sessionStorage.removeItem("bookdangxiang")
      sessionStorage.removeItem("yxdangxiang")
      sessionStorage.removeItem("lillundangxiang")
      sessionStorage.removeItem("gaoliang")
      sessionStorage.removeItem("szGaoliang")
      sessionStorage.removeItem("lilunGaoliang")
      sessionStorage.removeItem("SJgaoliang")
      sessionStorage.removeItem("yxGaoliang")
      sessionStorage.removeItem("gglx")
      sessionStorage.removeItem("leibie")
      sessionStorage.removeItem("pcleibie")
      sessionStorage.removeItem("yxleibie")
      sessionStorage.removeItem("lilunleibie")
  },
  mounted() {
    this.getjiedians1();
    // this.diqu()
    // this.pici()
  },
  methods: {
    openedog(id) {
     this.indexnavs = false
     this.indexid = id
    },
    openedog1(id){
      this.indexnavs = true;
      this.indexid = 0

    },
    async pici(){
      let res =  await getpicidz({
        })
        if(res.code == 200){
           sessionStorage.setItem('pidzlist',JSON.stringify(res.data))
        }
    },
     async diqu(){
      let res =  await getdiqu({
        })
        if(res.code == 200){
           sessionStorage.setItem('diqu',JSON.stringify(res.data))
        }
    },
    touser(){
      const {href} = this.$router.resolve({ path: "/sc", query: {} });
      window.open(href, '_blank');
    },
    
    toshuji1(id){
     
        var arrw = [];
        arrw.push(id);
        sessionStorage.setItem("erjsnav", 2);
        sessionStorage.setItem("leibie", JSON.stringify(arrw));
        sessionStorage.setItem("bookdangxiang", 1);
        sessionStorage.setItem("gglx", 1);
        this.$router.push({ path: "/s5", query: {} });
      
    },
    shunianfen(val) {
      this.nianfen = val;
    },
    handleCheckChange() {
      // 目前被选中的菜单节点
      this.checkedKeys = this.$refs.menu.getCheckedKeys();
      // 半选中的菜单节点
      let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
      // 根据需求给接口传选中的结点或者是半选的结点
      this.checkedKeys.unshift.apply(this.checkedKeys, halfCheckedKeys);
      this.checkedKeys = this.checkedKeys.splice(1);
      return this.checkedKeys;
    },
    async handleCommand(command) {
      let res = await gettuichu();
      sessionStorage.removeItem("loginInfo");
      this.$router.push("/");
    },
    async getjiedians(id) {
      let res = await getjiedian1();
      if (res.code == 200) {
        this.data2 = res.data[id].children;
        this.shuzilist = res.data[0].children;
      }
    },
    async getjiedians1(id) {
      let res = await getjiedian1();
      if (res.code == 200) {
        this.shuzilist = res.data[0].children;
        this.lilunlist = res.data[3].children;
        this.yxlist = res.data[2].children;
        this.jclist = res.data[1].children;
      }
    },

    sousuos() {
      if (this.formInline.user == "") {
        this.$message.error({ message: "请输入搜索内容!", center: true });
      }
      
    },
    onSubmit() {
      if (this.active + 1 * 1 == 2) {
        if (this.formInline.user != "") {
          sessionStorage.setItem("erjsnav", 2);
          sessionStorage.setItem("sousuo", this.formInline.user);
          sessionStorage.setItem("leibie", JSON.stringify(this.leixinglist));
          sessionStorage.setItem("leibieNum", 45);
          sessionStorage.setItem("bookdangxiang", 0);
          sessionStorage.setItem("gglx", 0);
          this.$router.push({ path: "/s5", query: {} });
        } else {
          this.$message.error("请输入搜索内容！");
        }
      } else if (this.active + 1 * 1 == 5) {
        if (this.formInline.user != "") {
            sessionStorage.setItem("erjsnav", 0);
            sessionStorage.setItem("sousuo", this.formInline.user);
            sessionStorage.setItem("gglx", 0);
            this.$router.push({ path: "/s1", query: {} });
        }else{
            this.$message.error("请输入搜索内容！");
        }
      } else if (this.active + 1 * 1 == 1) {
        if (this.formInline.user != "") {
          if (this.leixinglist.length != 0) {
            //  var arr = [2018,2019,2020,2021,2022,2023];
            sessionStorage.setItem("erjsnav", 1);
            sessionStorage.setItem("sousuo", this.formInline.user);
            sessionStorage.setItem(
              "pcleibie",
              JSON.stringify(this.leixinglist)
            );
            // sessionStorage.setItem("pcnfs", JSON.stringify(this.arr));
            sessionStorage.setItem("pcdangxiang", 0);
            sessionStorage.setItem("gglx", 0);
            this.$router.push({ path: "/s2", query: {} });
          } else {
            this.$message.error("请选择类别！");
          }
        } else {
          this.$message.error("请输入搜索内容！");
        }
      } else if (this.active + 1 * 1 == 3) {
        if (this.formInline.user != "") {
          sessionStorage.setItem("erjsnav", 3);
          sessionStorage.setItem("sousuo", this.formInline.user);
          sessionStorage.setItem("yxleibie", JSON.stringify(this.leixinglist));
          sessionStorage.setItem("yxdangxiang", 0);
          sessionStorage.setItem("gglx", 0);
          this.$router.push({ path: "/s6", query: {} });
        } else {
          this.$message.error("请输入搜索内容！");
        }
      } else if (this.active + 1 * 1 == 4) {
        if (this.formInline.user != "") {
          sessionStorage.setItem("erjsnav", 4);
          sessionStorage.setItem("sousuo", this.formInline.user);
          sessionStorage.setItem("lilunleibie", JSON.stringify(this.leixinglist));
          sessionStorage.setItem("lillundangxiang", 0);
          sessionStorage.setItem("gglx", 0);
          this.$router.push({ path: "/s7", query: {} });
        } else {
          this.$message.error("请输入搜索内容！");
        }
      }
    },
    danPc(id) {
      var arr = [];
      arr.push(id);
      sessionStorage.setItem("erjsnav", 1);
      sessionStorage.setItem("sousuo", this.formInline.user);
      sessionStorage.setItem("pcleibie", JSON.stringify(arr));
      sessionStorage.setItem("gglx", 1);
      // sessionStorage.setItem("pcnfs", JSON.stringify(this.arr));
      sessionStorage.setItem("pcdangxiang", 1);
      this.$router.push({ path: "/s2", query: {} });
    },
    toyxdanx(id) {
        var arr1 =[];
        arr1.push(id);
        sessionStorage.setItem("erjsnav", 3);
        sessionStorage.setItem("sousuo", this.formInline.user);
        sessionStorage.setItem("yxleibie", JSON.stringify(arr1));
        sessionStorage.setItem("yxdangxiang", 1);
        sessionStorage.setItem("gglx", 1);
        this.$router.push({ path: "/s6", query: {} });
      
    },
    tolilun(id){
       var arrw = [];
        arrw.push(id);
        sessionStorage.setItem("erjsnav", 4);
        sessionStorage.setItem("sousuo", this.formInline.user);
        sessionStorage.setItem("lilunleibie", JSON.stringify(arrw));
        sessionStorage.setItem("lillundangxiang", 1);
        sessionStorage.setItem("gglx", 1);
        this.$router.push({ path: "/s7", query: {} });
    },
    retrieval() {
      if(this.active == 4){
          sessionStorage.setItem("erjsnav", 0);
      }else if(this.active == 0){
        sessionStorage.setItem("erjsnav", 0);
          // sessionStorage.setItem("erjsnav", 1);
      }else if(this.active == 1){
        sessionStorage.setItem("erjsnav", 0);
          // sessionStorage.setItem("erjsnav", 2);
      }else if(this.active == 2){
        sessionStorage.setItem("erjsnav", 0);
          // sessionStorage.setItem("erjsnav", 3);
      }else if(this.active == 3){
        sessionStorage.setItem("erjsnav", 0);
          // sessionStorage.setItem("erjsnav", 4);
      }
     
      this.$router.push("/retrieval");
    },

    tologout() {
      this.$router.push("/logout");
    },
    logins() {
      this.showLogin = !this.showLogin;
    },
    handleBlur() {
      this.activet = 0;
    },
    handleFocus() {
      this.activet = 1;
    },
    handleBlur1() {
      this.activet1 = 0;
    },
    handleFocus1() {
      this.activet1 = 1;
    },
    topath(id, url) {
      this.active = id;
      this.leixinglist = [];
      this.time1 = [];
      if (id == 0) {
        this.time1 = this.time2;
      } else if (id == 1) {
        this.time1 = this.booklist;
        this.getjiedians(id);
      } else if (id == 2) {
        this.time1 = this.yinxlist;
        // this.getjiedians(id);
      } else if (id == 3) {
        this.time1 = this.lilunlist;
        // this.getjiedians(id);
      }

      // this.$router.push(url);
      // sessionStorage.setItem("ids",id)
    },
  },
  components: {
    footbtn,
  },
};
</script>
